﻿@using ADShop.Models
@using ADShop.Repository
<div class="box">
    <div class="box-heading"><span>Latest</span></div>
    <div class="box-content">
        <div class="box-product">
            @foreach(Product ipLatest in Global.ListLatestProduct())
            { 
                <div>
                    <div class="image"><a href="~/DetailsProduct/Details/@ipLatest.IDProduct">@Html.Action("GetImage", "ProductManager", new { id = @ipLatest.IDProduct })</a></div>
                    <div class="name"><a href="~/DetailsProduct/Details/@ipLatest.IDProduct">@ipLatest.NameProduct</a></div>
                    <div class="price"> $@ipLatest.ListedPrice.ToString("0,00.##") </div>
                    <div class="rating">
                        @Html.Action("GetRating", "ProductManager", new { id = @ipLatest.IDProduct })
                    </div>
                </div>
            }
        </div>
    </div>
</div>
